/**
 *
 * @param {String} code
 */
const login = (code, encryptedData, iv) => new Promise((resolve, reject) => {
  wx.request({
    url: 'http://localhost:8080/v1/auth/wxminiapp/member/login',
    method: 'GET',
    dataType: 'json',
    data: { code, encryptedData, iv },
    success: result => resolve(result),
    fail: error => reject(error)
  });
});

module.exports = { login };